﻿using System;
namespace Kis.Xroad.Eu {
    
    
    [System.SerializableAttribute()]
    public partial class InlineSimpleType {
        
        private InlineSimpleType.BirthDateType @__birthDate;
        
        public InlineSimpleType() {
        }
        
        /// <summary>
        /// All parameters
        /// </summary>
        public InlineSimpleType(InlineSimpleType.BirthDateType @birthDate) {
            this.@__birthDate = @birthDate;
        }
        
        /// <summary>
        /// Copy Constructor
        /// </summary>
        protected InlineSimpleType(InlineSimpleType @inlineSimpleType) {
            this.@__birthDate = @inlineSimpleType.BirthDate;
        }
        
        public virtual InlineSimpleType.BirthDateType BirthDate {
            get {
                return this.@__birthDate;
            }
            set {
                this.@__birthDate = value;
            }
        }
        
        [System.SerializableAttribute()]
        public class BirthDateType : global::Xtee.Core.Schema.XsdDateTime {
            
            public BirthDateType(System.DateTime value) : 
                    base(value) {
                this.Validate();
            }
            
            public BirthDateType(string value) : 
                    base(value) {
                this.Validate();
            }
            
            public BirthDateType() : 
                    base(new System.DateTime()) {
            }
            
            public static bool TryParse(string value, out BirthDateType result) {
                try {
                    result = new BirthDateType(value);
                    return true;
                }
                catch (System.Exception ) {
                    result = null;
                    return false;
                }
            }
            
            public static implicit operator DateTime (BirthDateType value) {
                return value.Value;
            }
            
            public static implicit operator BirthDateType (System.DateTime value) {
                return new BirthDateType(value);
            }
        }
    }
}
